package com.twinkle.utils;

import com.twinkle.model.User;
import org.apache.shiro.SecurityUtils;

/**
 * @title: SessionUtil
 * @description:
 * @author: Paul
 * @date: 2023/2/21 8:49
 */
public class SessionUtil {

    /**
     * 获取当前登录用户的信息
     * @return
     */
    public static User getLoginUserInfo() {
        User userNow = (User) SecurityUtils.getSubject().getPrincipal();
        return userNow;
    }
}
